# GS Demo FTP同步工具 - PowerShell使用示例

Write-Host "GS Demo FTP同步工具 - 使用示例" -ForegroundColor Blue
Write-Host "========================================" -ForegroundColor Blue

Write-Host ""
Write-Host "1. 设置环境变量（请根据实际情况修改）" -ForegroundColor Yellow
$env:FTP_HOST = "192.168.1.100"
$env:FTP_USER = "your-username"
$env:FTP_PASSWORD = "your-password"
$env:FTP_PORT = "21"

Write-Host ""
Write-Host "2. 测试FTP连接" -ForegroundColor Yellow
Write-Host "正在测试连接..." -ForegroundColor Gray
go run main-simple.go test
if ($LASTEXITCODE -ne 0) {
    Write-Host "连接测试失败，请检查配置" -ForegroundColor Red
    Read-Host "按任意键退出"
    exit 1
}

Write-Host ""
Write-Host "3. 执行同步" -ForegroundColor Yellow
Write-Host "正在同步文件..." -ForegroundColor Gray
go run main-simple.go sync

Write-Host ""
Write-Host "同步完成！" -ForegroundColor Green
Read-Host "按任意键退出"
